# -*- coding: utf-8 -*-
import time
from selenium import webdriver
import unittest
from Page.loginPage import loginPage
from publicModule.login import login
from Page.noscanningPage import noscanningPage
from publicModule.noscanning import noscanning


class Test_Login(unittest.TestCase):

    def setUp(self):
        print('开始测试')
        self.driver = webdriver.Chrome()
        self.driver.implicitly_wait(10)
        self.driver.maximize_window()
        self.driver.get("http://10.22.26.34:8080/fwd/indexlis.jsp")
        time.sleep(3)
        self.loginPage = loginPage(self.driver)
        self.login =login(self.driver)
        self.noscanningPage = noscanningPage(self)
        self.noscanning = noscanning(self)

    @classmethod
    def tearDown (self):
        print('结束测试')
        self.driver.quit()

    def test01(self):
        print('test01')
        self.username = 'fw001'
        self.password = '001'
        self.orgcode = '862100'

        login.login(self, self.username, self.password, self.orgcode)




if __name__ =='__main__':
    suite = unittest.TestLoader.loadTestsFromTestCase(Test_Login)
    unittest.TextTestRunner().run(suite)
    # unittest.main()